/**
	此代码文件主要负责诸如主界面绘制逻辑、菜单功能等基本逻辑的实现
**/

'use strict';

const {ipcRenderer} = require('electron')

$(function(){

	//绘制部分，绘制主界面窗体，但是主界面即将重制，等待修改——————————————————————
	let topInfo = $("#topInfo").get(0);
	let topInfoCtx = topInfo.getContext('2d');
	topInfoCtx.beginPath();
	topInfoCtx.moveTo(0,0);
	topInfoCtx.lineTo(53, 64);
	topInfoCtx.lineTo(1073, 64);
	topInfoCtx.lineTo(1126, 0);

	topInfoCtx.moveTo(340, 0);
	topInfoCtx.lineTo(393, 64);
	topInfoCtx.lineTo(733, 64);
	topInfoCtx.lineTo(786, 0);

	topInfoCtx.stroke();

	//控制历史快照的显示与否的逻辑，命名不够规范，等待重构————————————————————————
	let copyShowOrNot = false;
	$("#copyBtn").click(function(){
		let copyInfo = $(".copyInfo");
		if(!copyShowOrNot)
		{
			copyInfo.removeClass('copyInfo-hidden');
			copyInfo.addClass('copyInfo-show');
			copyShowOrNot = true;
		}
		else
		{
			copyInfo.addClass('copyInfo-hidden');
			copyInfo.removeClass('copyInfo-show');
			copyShowOrNot = false;			
		}
	});

	//初始化选择控件
});

